﻿"use strict"
app.config(["$stateProvider","$urlRouterProvider",routeFn]);
function routeFn($stateProvider,$urlRouterProvider){
    $urlRouterProvider.otherwise("/index");
    $stateProvider
    	.state("index",{
            url:"/index",
            templateUrl:"views/index.html",
            controller:"indexCtrl",
            controllerAs:"index",
            resolve:{
                deps:["$ocLazyLoad",function($ocLazyLoad){
                    return $ocLazyLoad.load(["controllers/index.js?t=3","css/list.css?t=3"]);
                }]
            }
        })
    	.state("myCenter",{
            url:"/myCenter",
            templateUrl:"views/myCenter.html",
            controller:"myCenterCtrl",
            controllerAs:"myCenter",
            resolve:{
                deps:["$ocLazyLoad",function($ocLazyLoad){
                    return $ocLazyLoad.load(["controllers/myCenter.js?t=3"]);
                }]
            }
        })
};